package cn.ljy.authority.web.controller.backstage.authority;


import cn.ljy.authority.model.SysConfig;
import cn.ljy.authority.model.query.SysConfigQuery;
import cn.ljy.authority.service.SysRoleService;
import cn.ljy.authority.web.controller.backstage.BaseBackstageController;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "后台网站配置模块")
@RestController
@RequestMapping(value = "/backstage/authority/config")
public class SysConfigController extends BaseBackstageController<SysConfig, SysConfigQuery,Integer> {

    @Autowired
    private SysRoleService baseService;

    @Override
    public String getAuthorityPrefix() {
        return "sys:role"; // 定义模块权限前缀
    }

//    @PreAuthorize("hasAuthority('sys:role:query')")
//    @GetMapping("/all")
//    @Override
//    public ResponseData query(SysConfigQuery sysConfigQuery){
//        return super.query(sysConfigQuery);
//    }
//
//
//    @ApiOperation(value = "分页查询网站配置列表")
//    @PreAuthorize("hasAuthority('sys:role:query')")
//    @Override
//    public ResponseData query(Integer page, Integer pageSize, SysConfigQuery sysConfigQuery){
//        return super.query(page,pageSize,sysConfigQuery);
//    }
//
//
//    @ApiOperation(value = "批量删除指定的多个配置")
//    @PreAuthorize("hasAuthority('sys:role:del')")
//    @Override
//    public ResponseData deletes(@NotEmpty(message="请选择要移除的记录")Integer[] ids){
//        return super.deletes(ids);
//    }
//
//    @ApiOperation(value = "读取指定配置信息")
//    @PreAuthorize("hasAuthority('sys:role:query')")
//    @Override
//    public ResponseData get(@PathVariable Integer id) {
//        return super.get(id);
//    }
//
//    @ApiOperation(value = "编辑配置")
//    @PreAuthorize("hasAuthority('sys:role:edit')")
//    @Override
//    public ResponseData edit(@Validated({UpdateWorkValidation.class}) @RequestBody SysConfig sysConfig){
//        return super.edit(sysConfig);
//    }
//
//    @ApiOperation(value = "添加网站配置")
//    @PreAuthorize("hasAuthority('sys:role:add')")
//    @Override
//    protected ResponseData add(@Validated({AddWorkValidation.class}) @RequestBody SysConfig sysConfig) {
//       return super.add(sysConfig);
//    }


}
